<html><head><title>DisableGadget</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">DisableGadget()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#3A3966"><b>DisableGadget</b></font>(#Gadget, State)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Disable or enable the gadget. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Gadget</i></td>
<td width="90%"> 
The gadget to enable or disable. 

</td></tr>
<tr><td><i>State</i></td>
<td> 
The new state of the gadget. 
If State = 1, the gadget will be disabled, if State = 0 it will be enabled. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#3A3966">If</font></b> <font color="#3A3966">OpenWindow</font>(0, 0, 0, 250, 105, &quot;Disable/enable buttons...&quot;, <font color="#924B72">#PB_Window_SystemMenu</font> | <font color="#924B72">#PB_Window_ScreenCentered</font>)
<font color="#3A3966">    ButtonGadget</font>(0, 10, 15, 230, 30, &quot;Disabled Button&quot;) :<font color="#3A3966"> DisableGadget</font>(0, 1)
<font color="#3A3966">    ButtonGadget</font>(1, 10, 60, 230, 30, &quot;Enabled Button&quot;) :<font color="#3A3966"> DisableGadget</font>(1, 0)
    <b><font color="#3A3966">Repeat</font></b> : <b><font color="#3A3966">Until</font></b> <font color="#3A3966">WaitWindowEvent</font>() = <font color="#924B72">#PB_Event_CloseWindow</font>
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>
<br>
<p><img src="../HelpPictures/disablegadget.png"></p>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="hidegadget.html">HideGadget()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=dategadget.html>DateGadget()</a> - <a href="index.html">Gadget Index</a> - <a href="editorgadget.html">EditorGadget()</a> -><br><br>

</body></html>